package com.example.block_chain.exception;


import com.example.block_chain.common.AppHttpCodeEnum;
import lombok.Getter;

/*
 *@description: 异常
 *@author: hisen
 *@Time: 2023/10/26  17:26
 */
@Getter
public class SystemException extends RuntimeException {
    private final int code;

    private final String msg;

    public SystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }
}
